package cn.edu.zjicm.wordsnet_d.pay;

import android.database.Cursor;

public class Order {

	private long orderId;
	private int userId;
	private int productId;
	private int tradeStatus = 1; // 0创建，1是success,2Cancel
	private double orderAmount;
	private long orderTime;
	private long gmtCreate;
	private long gmtModified;

	public Order(long orderId, int userId, int productId, int tradeStatus, double orderAmount, long orderTime, long gmtCreate, long gmtModified) {
		super();
		this.orderId = orderId;
		this.userId = userId;
		this.productId = productId;
		this.tradeStatus = tradeStatus;
		this.orderAmount = orderAmount;
		this.orderTime = orderTime;
		this.gmtCreate = gmtCreate;
		this.gmtModified = gmtModified;
	}

	public Order(Cursor c) {
		this(c.getLong(0), c.getInt(1), c.getInt(2), c.getInt(3), c.getDouble(4), c.getLong(5), c.getLong(6), c.getLong(7));
	}

	public long getOrderId() {
		return orderId;
	}

	public void setOrderId(long orderId) {
		this.orderId = orderId;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getProductId() {
		return productId;
	}

	public void setProductId(int productId) {
		this.productId = productId;
	}

	public int getTradeStatus() {
		return tradeStatus;
	}

	public void setTradeStatus(int tradeStatus) {
		this.tradeStatus = tradeStatus;
	}

	public double getOrderAmount() {
		return orderAmount;
	}

	public void setOrderAmount(double orderAmount) {
		this.orderAmount = orderAmount;
	}

	public long getOrderTime() {
		return orderTime;
	}

	public void setOrderTime(long orderTime) {
		this.orderTime = orderTime;
	}

	public long getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(long gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public long getGmtModified() {
		return gmtModified;
	}

	public void setGmtModified(long gmtModified) {
		this.gmtModified = gmtModified;
	}

}
